home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
hope
/
machope.lha
/
hope
/
Makefile
< prev
next >
Wrap
Makefile
|
1990-07-15
|
4KB
|
121 lines
# Fiddlable parameters:
NAME = hope
# (what the program is called)
BIN = $$HOME/bin
# (where to put the executable version)
HOPELIB = $$HOME/hope/lib
# (where the standard modules live)
STATS = # -DSTATS
# (set this to get space usage statistics)
LEAKS = # -DLEAKS
# (set this to get leak checks)
DEBUG = -DEBUG
# (set this to facilitate debugging, by retaining symbols)
PROFILE = # -pg
# (set this to get profiling)
SHELL = /bin/sh
CPPFLAGS = '-DHOPELIB="'$(HOPELIB)'"' $(STATS) $(LEAKS) $(DEBUG)
CFLAGS = -O -pipe $(PROFILE)
LDFLAGS = -n $(PROFILE)
LINTFLAGS = -ahz
YFLAGS =
HEADERS = cell.h defs.h deftype.h error.h expr.h memory.h module.h op.h \
path.h strings.h typevar.h
C_SRCS = builtin.c cell.c compare.c compile.c deftype.c eval.c expr.c \
interpret.c main.c memory.c module.c number.c path.c pr_expr.c \
pr_value.c stream.c strings.c type.c yylex.c
CFILES = $(C_SRCS) yyparse.c
SOURCES = $(HEADERS) $(C_SRCS) yyparse.y
OBJECTS = builtin.o cell.o compare.o compile.o deftype.o eval.o expr.o \
interpret.o main.o memory.o module.o number.o path.o pr_expr.o \
pr_value.o stream.o strings.o type.o yylex.o yyparse.o
LIBS =
$(NAME): $(OBJECTS)
$(CC) $(LDFLAGS) -o $(NAME) $(OBJECTS) $(LIBS)
install: $(NAME)
/bin/cp $(NAME) $(BIN)
strip $(BIN)/$(NAME)
sources: $(CFILES)
clean:
rm -f *.o yyparse.[ch] y.* core a.out lint checks tags LOG
cd doc; rm -f *.dvi *.log *.aux
clobber: clean
rm -f $(NAME)
yyparse.h yyparse.c: yyparse.y multiply.sed
sed -f multiply.sed yyparse.y >y.tab.y
$(YACC) $(YFLAGS) -d y.tab.y
# rm -f y.tab.y
mv y.tab.c yyparse.c
mv y.tab.h yyparse.h
tags: $(SOURCES)
ctags -w $(SOURCES)
lint: $(OBJECTS)
lint $(LINTFLAGS) $(CPPFLAGS) $(LIBS) $(CFILES) >lint
# test a new version of the interpreter, by running it on some examples
# and comparing with the expected output.
checks: $(NAME) test/*.in
for file in test/*.in;\
do name=`basename $$file .in`;\
./$(NAME) <$$file | diff - test/$$name.out |\
sed "s/^/$$name: /";\
done >checks
# Generate dependencies of source files on header files.
# Only inclusions of relative file names yield dependencies.
depend: $(CFILES)
(echo '/^#.* PUT NO STUFF BELOW/,$$d'; echo w; echo q) | ed - Makefile
echo '# Dependencies generated by make depend: PUT NO STUFF BELOW' >>Makefile
for file in $(CFILES);\
do $(CC) $(CPPFLAGS) -E $$file |\
sed -n 's@^# [1-9][0-9]* "\([^/].*\.h\)".*@\1@p' |\
sed -e 's@^\./@@' -e 's@[^/]*/\.\./@@g' |\
sed "s/^/`basename $$file .c`.o: /";\
done | sort -u | awk '\
$$1 != last || length(line)+length($$2) > 78 { print line; line = last = $$1 }\
{ line = line " " $$2 }\
END { print line }' >>Makefile
# Dependencies generated by make depend: PUT NO STUFF BELOW
builtin.o: cell.h defs.h deftype.h error.h expr.h memory.h op.h path.h
builtin.o: strings.h typevar.h
cell.o: cell.h defs.h deftype.h error.h expr.h memory.h path.h strings.h
cell.o: typevar.h
compare.o: cell.h defs.h deftype.h expr.h path.h strings.h typevar.h
compile.o: defs.h deftype.h expr.h path.h strings.h typevar.h
deftype.o: defs.h deftype.h error.h memory.h op.h strings.h typevar.h
eval.o: defs.h deftype.h expr.h path.h strings.h typevar.h
expr.o: defs.h deftype.h error.h expr.h memory.h path.h strings.h typevar.h
interpret.o: cell.h defs.h deftype.h error.h expr.h memory.h path.h strings.h
interpret.o: typevar.h
main.o: defs.h deftype.h expr.h memory.h module.h op.h path.h strings.h
main.o: typevar.h
memory.o: defs.h error.h memory.h
module.o: defs.h deftype.h error.h expr.h memory.h module.h op.h path.h
module.o: strings.h typevar.h
number.o: defs.h deftype.h error.h expr.h path.h strings.h typevar.h
path.o: defs.h memory.h path.h
pr_expr.o: defs.h deftype.h expr.h op.h path.h strings.h typevar.h
pr_value.o: cell.h defs.h deftype.h expr.h memory.h op.h path.h strings.h
pr_value.o: typevar.h
stream.o: cell.h defs.h deftype.h error.h expr.h path.h strings.h typevar.h
strings.o: defs.h memory.h strings.h
type.o: cell.h defs.h deftype.h error.h expr.h op.h path.h strings.h typevar.h
yylex.o: defs.h deftype.h error.h expr.h module.h op.h path.h strings.h
yylex.o: typevar.h yyparse.h
yyparse.o: defs.h deftype.h expr.h memory.h module.h op.h path.h strings.h
yyparse.o: typevar.h